<template>
  <div class="op-tabItem1">
    <div
      class="op-tabItem1-icon"
      :style="{ backgroundColor: config.bg }"
    >
      <img :src="config.icon" />
    </div>
    <div class="op-tabItem1-content">
      <div class="op-tabItem1-content-label">
        {{ config.label }}
      </div>
      <span class="op-tabItem1-content-val">
        <span class="op-tabItem1-content-val-num">
          {{ value }}
        </span>
        {{ config.unit }}
      </span>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    config: {
      type: Object
    },
    value: {
      type: [Number, String],
      default: 0
    }
  }
}
</script>
<style lang="scss">
.op-tabItem1 {
  width: 100%;
  height: 33.33%;
  background: url('~@/assets/img/overview/td-mid-bg.png')
    no-repeat;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  &-icon {
    min-width: 33.83%;
    height: 83%;
    background: url('~@/assets/img/overview/yy-top-bg.png')
      no-repeat;
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-left: 2.23%;
    // margin-right: 17.41%;
    img {
      width: 60px;
      height: 60px;
    }
  }
  &-content {
    flex: 1;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    padding-left: 20px;
    &-label {
      width: 100%;
      font-size: 14px;
      line-height: 14px;
      font-weight: 500;
      color: #4c565c;
      margin-bottom: 15px;
    }
    &-val {
      width: 100%;
      display: flex;
      align-items: flex-end;
      justify-content: flex-start;
      font-size: 14px;
      line-height: 14px;
      font-weight: 500;
      color: #4c565c;
      margin-bottom: 3px;
      white-space: normal;
      word-break: break-all;
      display: inline-block;
      &-num {
        font-size: 18px;
        line-height: 18px;
        font-family: DIN;
        font-weight: bold;
        color: #000000;
        margin: 0 5px -2px 0;
      }
    }
  }
}
</style>
